﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AvansRS.Domain;
using FluentNHibernate.Mapping;


namespace AvansRS.Data.Mapping
{
    public class EventDateMap : ClassMap<EventDate>
    {
        public EventDateMap()
        {
            Id(x => x.ID);
            Map(x => x.ForStudents);
            Map(x => x.AllowChanges);
            Map(x => x.Date)
                .Unique();
            References(x => x.Event)
                .Not.LazyLoad();
            References(x => x.Rooster)
                .Not.LazyLoad();

            HasMany(x => x.Registrations)
                .Not
                .LazyLoad();
        }
    }
}
